package com.ibeeking.found.common.enums.marketing;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 券核销渠道枚举
 */
public enum CouponVerificationChannelEnum {

    /**
     * 券核销渠道枚举
     */
    OUTLINE_POS(1, "线下pos"),
    SHOP_APPLETS(2, "商户小程序"),
    ONLINE_MALL(3, "线上商城"),
    PARKING(4, "停车场"),
    CUSTOMER_SERVICE_DESK(5, "客服台"),
    ;

    private Integer code;
    private String lable;

    CouponVerificationChannelEnum(Integer code, String lable) {
        this.code = code;
        this.lable = lable;
    }

    public Integer getCode() {
        return code;
    }

    public String getLable() {
        return lable;
    }

    public static CouponVerificationChannelEnum getEnum(Integer code) {
        for (CouponVerificationChannelEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj;
            }
        }
        return null;
    }
}
